package com.fly.platform.common.lock

/**
 * @author sunyujia@aliyun.com https://github.com/yujiasun/Distributed-Kit
 */
interface Callback {

    /**
     * 成功获取锁后执行方法
     * @return
     * @throws InterruptedException
     */
    @Throws(InterruptedException::class)
    fun onGetLock(): Any?

    /**
     * 获取锁超时回调
     * @return
     * @throws InterruptedException
     */
    @Throws(InterruptedException::class)
    fun onTimeout(): Any?
}